package com.ljc.dao;

import com.ljc.entity.DevicePurchasePlanning;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;
@Mapper
@Repository

public interface DevicePurchasePlanningDao {

    void add(List<DevicePurchasePlanning> devicePurchasePlannings);

    @Select("select * from device_purchase_planning where project_planning_id=#{projectId}")
    List<DevicePurchasePlanning> findByProjectPlanningId(int projectId);

    @Delete("delete from device_purchase_planning where project_planning_id=#{projectPlanningId}")
    void deleteByProjectPlanningId(int projectPlanningId);
}
